package com.ren.feign.api.recl_user;

import com.ren.feign.api.recl_user.Impl.ReclUserDegradeClient;
import com.ren.feign.entity.ReclUserVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @InterfaceName: ReclUserClient
 * @Description: TODO
 * @Author: RZY
 * @DATE: 2022/7/13 16:07
 * @Version: v1.0
 */
@FeignClient(name = "recl-user", path = "/recl-user", fallback = ReclUserDegradeClient.class)
@Component
public interface ReclUserClient {

    @ApiOperation(value = "远程批量查询FM用户信息")
    @GetMapping("/remote-fm-users-info")
    List<ReclUserVo> getRemoteFmUsersInfo(@RequestParam List<Long> userIds);

    @ApiOperation(value = "远程查询单个Fm用户信息")
    @GetMapping("/remote-fm-user-info")
    ReclUserVo getRemoteFmUserInfo(@RequestParam Long userId);

    @ApiOperation(value = "远程批量查询美文用户信息")
    @GetMapping("/remote-article-users-info")
    public List<ReclUserVo> getRemoteArticleUsersInfo(@RequestParam List<Long> userIds);

    @ApiOperation(value = "远程查询单个美文用户信息")
    @GetMapping("/remote-article-user-info")
    public ReclUserVo getRemoteArticleUserInfo(@RequestParam Long userId);
}
